package kr.pe.osdev.advice;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class LoggingAspect {
    protected final Log logger = LogFactory.getLog(getClass());

    @Pointcut("execution(* * ..UserDao.addUser(..))")
    public void addUserPointCut() {
        
    }

    @Before("addUserPointCut()")
    public void beforeAddUser() {
        System.err.println("AAAA");
    }
    
    @AfterReturning("addUserPointCut()")
    public void aftereAddUser() {
        System.err.println("BBBB");
    }
}